/**
 * Created by dbwyxl on 2017/9/1.
 */
module.exports = function($timeout){
  return {
    link: function(scope, element, attrs) {
      scope.$watch(attrs.autoFocusMuch, function(value) {
        if(value === true) {

          $timeout(function() {
          element[0].focus();
          // scope[attrs.autoFocusMuch] = false;
          });
        }
      });
    }
  };

};


